﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RVBike
{
    public class SaveState
    {
        public GameMode GameMode { get; set; }
        public string StageName { get; set; }
        public double GameSpeed { get; set; }
        public float Mileage { get; set; }
        public int Time { get; set; }

        public override string ToString()
        {
            string mode = "normal_mode";
            switch (GameMode)
            {
                case GameMode.Normal: mode = "normal_mode"; break;
                case GameMode.Mileage: mode = "mileage_mode"; break;
                case GameMode.Time: mode = "time_mode"; break;
                default :mode = "normal_mode";break;
            }
            mode = MultiLanguage.Instance().Translate(mode);

            RVStage stage = StageManager.Instance().GetStage(StageName);

            // map name : mileage (unit), time[hh:mm:ss] (mode)
            return String.Format("{0} : {1} {2}, {3:00}:{4:00}:{5:00} ({6})",
                stage.DisplayName,
                Mileage,
                MultiLanguage.Instance().Translate("distance_unit"),
                Time / 3600,
                (Time / 60) % 60,
                (Time % 60),
                mode);
        }
    }
}
